$(function () {
	var regconfig = [
		{ eleinput: "login-phone", eletext: "login-phone-text", rule: [{ reg: /^.+$/, text: "手机号不能为空" }, { reg: /^1[0123456789]\d{9}$/, text: "手机号格式错误" }] },
		{ eleinput: "login-password", eletext: "login-password-text", rule: [{ reg:/^.{6,10}$/,text:'密码在6-10位之间'}] }
	];
	tbdValidate(
		regconfig,
		{
			elesubmit: "login-submit",//提交按钮
			funsubmit: function () {//验证通过可提交回调	
				var phoneval = 	$('#login-phone').val();	
				if (checkphone(phoneval, 'login')){
					$('.form-submit').submit();
				}
			},
			funerr: function () {//不可提交回调

			},
			funerrlist: function (errlist) {
				$('#' + errlist[0]).focus();
			}
		}
	);
});